<?php
class model_UserModel {
    private $id;
    private $username;
    private $password;
    private $role;
    private $salt;
    private $karma;
    private $sex;
    private $name;
    private $surname;
    private $avatar;
    private $about;
    private $age;

    public function  __construct($row = null) {
        if (null != $row) {
            $this->setId($row['id'])
                    ->setUsername($row['username'])
                    ->setPassword($row['password'])
                    ->setSalt($row['salt'])
                    ->setRole($row['role'])
                    ->setKarma($row['karma'])
                    ->setSex($row['sex'])
                    ->setName($row['name'])
                    ->setSurname($row['surname'])
                    ->setAvatar($row['avatar'])
                    ->setAbout($row['about'])
                    ->setAge($row['age']);
        }
    }

    public  function setId($id) {
        $this->id = $id;
        return $this;
    }

    public  function getId() {
        return $this->id;
    }

    public  function setUsername($username) {
        $this->username = $username;
        return $this;
    }

    public  function getUsername() {
        return $this->username;
    }

    public  function setPassword($password) {
        $this->password = $password;
        return $this;
    }

    public  function getPassword() {
        return $this->password;
    }

    public  function setRole($role) {
        $this->role = $role;
        return $this;
    }

    public  function getRole() {
        return $this->role;
    }

    public function getSalt() {
        return $this->salt;
    }

    public function setSalt($salt) {
        $this->salt = $salt;
        return $this;
    }
    public function getKarma() {
        return $this->karma;
    }

    public function setKarma($karma) {
        $this->karma = $karma;
        return $this;
    }
    public function getSex() {
        return $this->sex;
    }

    public function setSex($sex) {
        $this->sex = $sex;
        return $this;
    }

    public function getName() {
        return $this->name;
    }

    public function setName($name) {
        $this->name = $name;
        return $this;
    }

    public function getSurname() {
        return $this->surname;
    }

    public function setSurname($surname) {
        $this->surname = $surname;
        return $this;
    }

    public function getAvatar() {
        return $this->avatar;
    }

    public function setAvatar($avatar) {
        $this->avatar = $avatar;
        return $this;
    }
    
    public function getAbout() {
        return $this->about;
    }

    public function setAbout($about) {
        $this->about = $about;
        return $this;
    }
    
    public function getAge() {
        return $this->age;
    }

    public function setAge($age) {
        $this->age = $age;
        return $this;
    }
}